The Controller Area Network (CAN) protocol is a serial communication protocol for communicating between various electronic devices of a vehicle such as an automobile. In accordance with the CAN protocol, multiple different electronic devices of a vehicle can be coupled to a single serial bus such that messages and data may be sent from one electronic device of the vehicle to another. The CAN protocol is a message based protocol wherein CAN frames are placed on a common CAN bus. The CAN bus may be a single wire or may be a differentially driven pair of wires. Each electronic device ("node") on the common CAN bus receives each frame present on the bus and filters out those frames which are not required in performing that node's tasks. For example, if a device associated with an automobile dashboard sends onto the CAN bus a frame requesting that the automobile headlights be turned on, then the device on the CAN bus responsible for the brake lights can determine that the frame is intended for another node and therefore will not act upon the frame. The device controlling the headlights, however, receives and acts upon the frame by turning the headlights on. Identifier bits are therefore provided in CAN frames to allow messages and data to be directed to certain nodes on the CAN bus and not to other nodes on the CAN bus.
FIGS. 1A-D (Prior Art) are diagrams illustrating four different types of CAN frames. In FIGS. 1A-D, and "r" designates a bit having recessive logic level and a "d" designates a bit having a dominant logic level. If one node places a dominant bit on the bus at the same time that another node places a recessive bit on the bus, the bus will assume the logic level of the dominant bit. By monitoring the voltage level on the bus, the node attempting to transmit the recessive bit will be able to determine that the bus is not idle but rather than traffic exists on the bus.
FIG. 1A is a diagram of a CAN data frame. Data frames are used to transmit information such as data and/or messages from one node to another node over the CAN bus. The data frame of FIG. 1A includes a start of frame bit, an arbitration field, a control field, a data field, a cyclic redundancy check (CRC) field, an acknowledgement field and an end of frame field. The data field includes up to eight bytes of data. A message may, for example be encoded in the date field. FIG. 1B is a diagram of a CAN remote frame. A remote frame is used to request data from other CAN nodes. A remote frame is identical to a data frame except that the remote transmission request (RTR) bit is `recessive` and there is no data field. FIG. 1C is a diagram of a CAN error frame. Error frames are used to communicate error conditions detected on the CAN bus to other nodes. An error frame can start anywhere in the middle of another frame. FIG. 1D is a diagram of a CAN overload frame. An overload frame is used to indicate that a receiving node is not able to process all the information sent to it over the CAN bus. An overload frame can only start at the end of another frame. Using these four types of frames, information can be passed back and forth between the various devices (nodes) coupled to a CAN bus.
FIG. 2 (Prior Art) is an illustration of a typical electronic device coupled to a CAN bus in a vehicle. The device includes a core processor 1, an associated CAN interface 2, and input/output circuitry 3. The input/output circuitry 3 couples the core processor to the vehicle. The input/output circuitry 3 may, for example, be coupled to actuators and sensors which are part of a control loop. The input/output circuitry 3 may include input/output circuitry such as drivers, amplifiers, buffers, registers, timers, A/D converters, and D/A converters disposed on a single integrated circuit chip with the processor core. The input/output circuitry may also include input/output circuitry not realized on the same integrated circuit as the processor core. The CAN interface 2 couples the core processor 1 to a CAN bus 4.
In one CAN interface of the prior art, communication transactions are handled by the CAN interface. In order to transmit a message, the core processor places the data field of a frame to be transmitted into a transmit buffer of the CAN interface 2 which is adequately long to hold the data field. The core processor 1 than sets a designated bit in the CAN interface which indicates to the CAN interface that a frame containing the information in the transmit buffer is to be transmitted. The CPU is then free to attend to other tasks which the CAN interface transmits the frame. The CAN interface determines that the bus is idle and then transmits the frame, the bits of the data field being sent from the transmit buffer in the CAN interface. Similarly, when a frame is to be received, the CAN interface receives the entire data field of the frame into a single receive buffer in the CAN interface which is adequately long to hold the received data field. Only if the frame was received error free does the CAN interface alert the core processor. If any transmission error occurs, the CAN interface handles the error in accordance with the CAN protocol without requiring any action by the core processor. The core processor is therefore able to read the complete correctly received data field from the receive buffer of the CAN interface.
Core processors having such a CAN interface have, however, been somewhat costly due to the silicon area associated with realizing the CAN interface. Because multiple devices, each having its own CAN interface, are to be coupled to the CAN bus in an automobile, the high cost of each of the CAN interfaces sums and increases the cost of the automobile.